package StructuralPatterns.Composite;

public class Test {

  public static void main(String[] args) {
    University university = new University("珠海科技学院", "最好的民办大学");

    College college1 = new College("计算机学院", "");
    College college2 = new College("化学院", "");

    Department department1 = new Department("软件工程", "计算机");
    Department department2 = new Department("网络工程", "计算机");
    Department department3 = new Department("化学工程与工艺", "化学");
    Department department4 = new Department("应用化学", "化学");

    college1.add(department1);
    college1.add(department2);
    college2.add(department3);
    college2.add(department4);

    university.add(college1);
    university.add(college2);

    university.print();
  }
}
